package org.darcy.service.impl;

import org.darcy.dao.BizPageMapper;
import org.darcy.entity.BizPage;
import org.darcy.framework.generic.GenericServiceImpl;
import org.darcy.service.BizPageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

@Service
public class BizPageServiceImpl extends GenericServiceImpl<BizPage> implements BizPageService {

	@Autowired
	private BizPageMapper bizPageMapper;

	@Override
	public BizPage getByUrl(String url) {
		if (StringUtils.isEmpty(url)) {
			return null;
		}
		QueryWrapper<BizPage> q = new QueryWrapper<BizPage>();
		q.eq("url", url);
		BizPage data = bizPageMapper.selectOne(q);
		return data;
	}

}
